sched/rt: Fix memory leak in rt_init()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 10 May 2016 13:37:00 +0000 (14:37 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 10 May 2016 14:50:33 +0000 (15:50 +0100)
commitfdb9a18698c9ab8e8e8e875f20184b4aa5d62825
tree19aa36382e199f75f5f21368a386bc3e2c3185c1
parent2656bc7b0c145932e1af80d54d48975edd081997
sched/rt: Fix memory leak in rt_init()

c/s 2656bc7b0 "xen: adopt .deinit_pdata and improve timer handling"
introduced a error path into rt_init() which leaked prv if the
allocation of prv->repl_timer failed.

Introduce an error cleanup path.

Spotted by Coverity.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
---
CC: George Dunlap <george.dunlap@eu.citrix.com>
CC: Dario Faggioli <dario.faggioli@citrix.com>
xen/common/sched_rt.c